package Meituan.Feature;

import com.google.common.base.Splitter;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * @author: leiwenkang
 * @date: 2020/4/24
 * @time: 19:42
 */
public class FeatureRemoveSg {
    public static void main(String[] args) {
        String str = "sg_search_cnt_in_3_month long comment '',\n" +
                "sg_search_cnt_in_2_month long comment '',\n" +
                "sg_search_cnt_in_1_month long comment '',\n" +
                "sg_search_cnt_in_2_week long comment '',\n" +
                "sg_search_cnt_in_1_week long comment '',\n" +
                "sg_click_cnt_in_3_month long comment '',\n" +
                "sg_click_cnt_in_2_month long comment '',\n" +
                "sg_click_cnt_in_1_month long comment '',\n" +
                "sg_click_cnt_in_2_week long comment '',\n" +
                "sg_click_cnt_in_1_week long comment '',\n" +
                "sg_view_cnt_in_3_month long comment '',\n" +
                "sg_view_cnt_in_2_month long comment '',\n" +
                "sg_view_cnt_in_1_month long comment '',\n" +
                "sg_view_cnt_in_2_week long comment '',\n" +
                "sg_view_cnt_in_1_week long comment '',\n" +
                "sg_ord_cnt_in_3_month long comment '',\n" +
                "sg_ord_cnt_in_2_month long comment '',\n" +
                "sg_ord_cnt_in_1_month long comment '',\n" +
                "sg_ord_cnt_in_2_week long comment '',\n" +
                "sg_ord_cnt_in_1_week long comment '',\n" +
                "sg_entry_expose_pv long comment '',\n" +
                "sg_entry_click_pv long comment '',\n" +
                "sg_home_page_expose_pv long comment '',\n" +
                "sg_submit_page_expose_pv long comment '',\n" +
                "sg_submitted_pv long comment '',\n" +
                "sg_work_day_cnt long comment '',\n" +
                "sg_weekend_am_day_cnt long comment '',\n" +
                "sg_weekend_pm_day_cnt long comment '',\n" +
                "sg_morning_cnt long comment '',\n" +
                "sg_night_cnt long comment '',\n" +
                "sg_lingqu_cnt\tlong,\n" +
                "sg_lingqu_coupon_amount\tlong,\n" +
                "sg_use_cnt\tlong,\n" +
                "sg_use_coupon_amount\tlong,\n" +
                "sg_lingqu_use_rate\tdouble,\n" +
                "sg_click_num long comment '',\n" +
                "sg_expose_num long comment '',\n" +
                "sg_poi_home_num long comment '',\n" +
                "sg_p_submit_order_num long comment '',\n" +
                "sg_avg_submit_original_price long comment '',\n" +
                "sg_submit_ord_num long comment '',\n" +
                "sg_push_ord_num long comment '',\n" +
                "sg_third_cate_score long comment '',\n" +
                "sg_ka_score long comment '',\n" +
                "sg_cka_score long comment '',\n" +
                "sg_sandian_score long comment '',\n" +
                "sg_cat_20_score long comment '',\n" +
                "sg_cat_21_score long comment '',\n" +
                "sg_cat_22_score long comment '',\n" +
                "sg_cat_1001_score long comment '',\n" +
                "sg_cat_5001_score long comment '',\n" +
                "sg_all_ck_7days long comment '',\n" +
                "sg_all_ck_30days long comment '',\n" +
                "sg_all_ck_90days long comment '',\n" +
                "sg_all_ck_rate_7_30days long comment '',\n" +
                "sg_all_ck_rate_30_90days long comment '',\n" +
                "sg_all_ck_rate_7_90days long comment '',";

        remove(str);
    }

    private static void remove(String str) {
        if (StringUtils.isBlank(str)) {
            return;
        }

        List<String> list = Splitter.on("\n").splitToList(str);
        for (String featureValue: list) {
            String featureName = featureValue.substring("sg_".length());
            System.out.println(featureName);
        }

    }
}
